parse

@Nullable()
public abstract T parse<T>(String json)

Creates an object that represents the result of parsing the given string in JSON format.

Return

the result of parsing. Can be null if the result of parsing is null. For example, when the given JSON string is "null", then the method returns null

Parameters

json

a string in JSON format

<T>

one of the following types: java.lang.Boolean, java.lang.Double, java.lang.String, or JsObject

Throws

when an invalid JSON string is passed

when json is empty or blank